/*
package com.taotao.api.service;

import com.taotao.config.WxMpConfiguration;
import com.taotao.entity.ServiceErrorDto;
import me.chanjar.weixin.mp.api.WxMpTemplateMsgService;
import me.chanjar.weixin.mp.bean.template.WxMpTemplateData;
import me.chanjar.weixin.mp.bean.template.WxMpTemplateMessage;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

*/
/**
 * @author wangjin
 * @title: WechatTemplateService
 * @projectName sw-gateway
 * @description:
 * @date 2021/12/12 12:54
 *//*

@RestController
public class WechatTemplateService {
    @RequestMapping("/sendWechatTemplateError")
    public String sendWechatTemplateError() {
        //获取微信公众号的配置内容信息
        WxMpTemplateMsgService wxMpTemplateMsgService = WxMpConfiguration.getMpServices().get("wx3645cf6d8df9edbb").getTemplateMsgService();
        WxMpTemplateMessage wxMpTemplateMessage = new WxMpTemplateMessage();
       //获取创建好的模板id
        wxMpTemplateMessage.setTemplateId("5zVK7tEQAE-vR75O5XIM7u-i74TK1C8-rwekzYEUzZk");
        //发送关注的微信公众号openid
        wxMpTemplateMessage.setToUser("ommED6cuwHYsgnT5WcamQhf2zJio");
        List<WxMpTemplateData> data = new ArrayList<>();
        data.add(new WxMpTemplateData("first", "mayikt-member"));
        data.add(new WxMpTemplateData("keyword1", "192.168.110.1:8080"));
        data.add(new WxMpTemplateData("keyword2", "空指针异常"));
        SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd ");
        String format = formatter.format(new Date());
        data.add(new WxMpTemplateData("keyword3", format + " 20:30"));
        wxMpTemplateMessage.setData(data);
        wxMpTemplateMessage.setUrl("http://www.mayikt.com");
        try {
            wxMpTemplateMsgService.sendTemplateMsg(wxMpTemplateMessage);
        } catch (Exception e) {
            e.printStackTrace();
//            userMapper.updateByUserIdOpenIdIsNull(openId);
//            UpdateWrapper<FollowOpenId> followOpenIdUpdateWrapper = new UpdateWrapper<>();
//            followOpenIdUpdateWrapper.eq("open_id", openId);
//            followOpenIdMapper.delete(followOpenIdUpdateWrapper);
        }
        return "ok";
    }
}
*/
